<?php

// mbilling/BillingBundle/Entity/messages.php
namespace mbilling\BillingBundle\Entity;
use Doctrine\ORM\Mapping as ORM;

/**
 * @ORM\Entity
 */
class messages
{
    /**
     * @ORM\Id
     * @ORM\Column(type="integer")
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    protected $id;

    /**
     * @ORM\Column(type="datetime")
     */
    protected $created_at;
    
    /**
     * @ORM\Column(type="string", length=50, nullable="TRUE")
     */
    protected $theme;
    
    /**
     * @ORM\Column(type="string", length=300)
     */
    protected $message;
    
    /**
     * @ORM\Column(type="boolean")
     */
    protected $was_read;
	
    /**
     * @ORM\Column(type="integer")
     */
    protected $user_from;
	
    /**
     * @ORM\Column(type="integer")
     */
    protected $user_to;

    public function __construct()
    {
        $this->setCreatedAt(new \DateTime());
    }
    
    public function setId($id)
    {
        $this->id = $id;
    }
    public function getId()
    {
        return $this->id;
    }

    public function setCreatedAt($created_at)
    {
        $this->created_at = $created_at;
    }
    public function getCreatedAt()
    {
        return $this->created_at;
    }
    
    public function setTheme($theme)
    {
        $this->theme = $theme;
    }
    public function getTheme()
    {
        return $this->theme;
    }

    public function setMessage($message)
    {
        $this->message = $message;
    }
    public function getMessage()
    {
        return $this->message;
    }

    public function setWasRead($was_read)
    {
        $this->was_read = $was_read;
    }
    public function getWasRead()
    {
        return $this->was_read;
    }

    public function setUserFrom($user_from)
    {
        $this->user_from = $user_from;
    }
    public function getUserFrom()
    {
        return $this->user_from;
    }

    public function setUserTo($user_to)
    {
        $this->user_to = $user_to;
    }
    public function getUserTo()
    {
        return $this->user_to;
    }
    
    public function initDefaultEntity()
    {
        $this->setTheme('test');
        $this->setMessage('test Message');
        $this->setWasRead('0');
        $this->setUserFrom('1');
        $this->setUserTo('2');
        return $this;
    }
}
?>
